package com.example.web.swagger;

import com.example.model.RestResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.DynamicParameter;
import com.github.xiaoymin.knife4j.annotations.DynamicResponseParameters;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;

import java.util.Map;

@Api(tags = "认证接口", produces = "application/json")
public interface ILoginController {

    @Operation(summary = "获取用户信息（示例一）", description = "根据id在取用户信息")
    @ApiOperationSupport(responses = @DynamicResponseParameters(properties = {
            @DynamicParameter(name = "code", value = "状态码"),
            @DynamicParameter(name = "msg", value = "状态信息"),
            @DynamicParameter(name = "data", value = "数据")
    }))
    public Map<String, Object> login1(String username, String password);

    @Operation(summary = "获取用户信息（示例二）", description = "根据id在取用户信息")
    public RestResult<Void> login2(String username, String password);

}
